package com.emcom.gotour.po;

import java.io.Serializable;
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * database table TOUR_CATEGORY bean.<br/>
 * @author Cui Zuoli
 * @version 1.0
 */
public class TourCategory implements Comparable<Object>, Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2054079678252850404L;
	private long id;
	private String typeId;
	private String name;
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getTypeId() {
		return typeId;
	}
	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		TourCategory myClass = (TourCategory) object;
		return new CompareToBuilder().append(this.id, myClass.id).append(
				this.name, myClass.name).append(this.typeId, myClass.typeId)
				.toComparison();
	}
	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof TourCategory)) {
			return false;
		}
		TourCategory rhs = (TourCategory) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.id, rhs.id).append(this.name, rhs.name).append(
				this.typeId, rhs.typeId).isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(1018020989, 1072038473).appendSuper(
				super.hashCode()).append(this.id).append(this.name).append(
				this.typeId).toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("typeId", this.typeId).append(
				"name", this.name).append("id", this.id).toString();
	}
}